package com.school.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.school.entity.HljtDevice;
import com.school.entity.web.HljtDeviceManagement;

@Repository
public interface HljtDeviceDao {
	/**
	 * 判断设备是否注册根据设备的Mac判断
	 * @param hljtDevice
	 * @return
	 */

	HljtDevice equipmentRegistration(HljtDevice hljtDevice);
	/**
	 * 添加设备
	 * @param hljtDevice
	 * @return
	 */
	int addDevice(HljtDevice hljtDevice);

	/**
	 * 通过Mac查找一个设备信息
	 * @param Mac
	 * @return
	 */
	public HljtDevice findDevice(String Mac);
	
	/**
	 * 查找所有设备信息
	 * @param Mac
	 * @return
	 */
	public List<HljtDevice>findDeviceAll();
	
	/**
	 * 修改设备表最后请求时间 和皮肤
	 * @param hljtDevice
	 * @return
	 */
	public int updateDevice(HljtDevice hljtDevice);
	
	/**
	 * 设备解除班级绑定
	 * @param hljtDevice
	 * @return
	 */
	Integer updateDeviceByMavAndClassId(HljtDevice hljtDevice);   
	
	
	/**
	 * 修改设备版本信息
	 * @param hljtDevice
	 * @return
	 */
	public Integer updateDeviceUrl(HljtDevice hljtDevice);
	
	/***
	 * 没有绑定班级的设备
	 * @return
	 */
	List<HljtDeviceManagement> deviceNotBoundClass();
	/***
	 * 设备绑定了班级的信息
	 * @return
	 */
	List<HljtDeviceManagement> deviceBindClassInfo(HljtDeviceManagement hljtDeviceManagement);
	/***
	 * 设备绑定了班级的总数
	 * @return
	 */
	Integer deviceBindClassCount();
	
	/***
	 * 设备模式信息
	 * @return
	 */
	List<HljtDeviceManagement> devicetaskByMac(HljtDeviceManagement hljtDeviceManagement );
	/***
	 * 修改模式信息
	 * @return
	 */
	Integer updateDevicetaskByMac(HljtDeviceManagement hljtDeviceManagement );
	/***
	 * 修改设备信息
	 * @return
	 */
	Integer updateDeviceByMac(List<HljtDeviceManagement> list );
	
	/***
	 * 添加模式信息
	 * @return
	 */
	Integer addDevicetask(List<HljtDeviceManagement> list);
	
	/***
	 * 删除模式信息
	 * @return
	 */
	Integer deletetDevicetaskByMacAndClassId(List<HljtDeviceManagement> list);
	/***
	 * 没有绑定设备的班级信息
	 * @return
	 */
	List<HljtDeviceManagement>classesWithoutBindingDevices();
	/***
	 * 所有设备手动开机时间
	 * @return
	 */
	HljtDevice allDeviceMacManualStarupTime(String mac);
	/***
	 * 修改设备状态
	 * @return
	 */
	//Integer updateDeviceStateByEndTime(HljtDevice hljtDevice);
	
	
	/***
	 * 修改所有设备的Modify
	 * @return
	 */
	Integer updateDeviceAllModify(HljtDevice hljtDevice);
	
	/***
	 * 通过班级获得mac
	 * @return
	 */
	String findDeviceByClassId(Integer classId);

     
}
